package com.yundasys.lab10designpattern.singleton;

/**
 * 第6种 - 使用静态内部类来实现
 *
 * @author jiangta
 * @version 1.0
 * @date 2021/4/14 11:48 上午
 */
public class InnerSingleton {

    private static class Singleton {
        private static Singleton instance = new Singleton();
    }

    public static Singleton getInstance() {
        return Singleton.instance;
    }
}
